const lark = require("@larksuiteoapi/node-sdk");
var axios = require("axios");


//更改对应的app_id
const FEISHU_APP_ID = "cli_a5353776bba9100d";
const FEISHU_APP_SECRET = "nSNp3X7T6NWgP7kkY3Rt9dGJpfjBbPcR";


const client = new lark.Client({
    appId: FEISHU_APP_ID,
    appSecret: FEISHU_APP_SECRET,
    disableTokenCache: false,
    appType: lark.AppType.SelfBuild,
    domain: lark.Domain.Feishu,
});


console.log("--------------start");

async function executeAsyncFunction001() {
    try {
        const result = await client.im.chat.get({
            params: {
                user_id_type: "open_id"
            }, path: {
                chat_id: "ou_e7658f978e3d479c9535a878a01c94f0"
            }
        });
        console.log("result")
        console.log(result.data)
    } catch (error) {
        console.error("catch error")
        console.error(error.data)
    }
}

executeAsyncFunction001()
console.log("--------------end");
